package com.yyyzzz.test;

import com.yyyzzz.DAO.impl.teacherDaoimpl;
import com.yyyzzz.bean.Teacher;
import com.yyyzzz.service.impl.teacherServiceImpl;
import org.junit.Test;
import java.sql.SQLException;
import java.util.List;


public class test {
    @Test
    public void test() throws ClassNotFoundException, SQLException {
        teacherDaoimpl teacherDaoimpl = new teacherDaoimpl ();
        Teacher teacher = new Teacher ();
teacher.setTeacherNo (5);
teacher.setTeachername ("寄过来");
teacher.setTeacherpassword("666");
teacher.setTeacherjob ("英语");
teacher.setSex ("男");
teacherDaoimpl.insterteacher (teacher);
    }
    @Test
public void test1() throws SQLException, ClassNotFoundException {
    teacherDaoimpl teacherDaoimpl = new teacherDaoimpl();
     Teacher teacher = teacherDaoimpl.getTeacherById (4);
        System.out.println (teacher);
}
@Test
public void test2() throws SQLException, ClassNotFoundException {
    teacherDaoimpl teacherDaoimpl = new teacherDaoimpl();
    Teacher teacher = teacherDaoimpl.check (5);
}
@Test
    public void test3() throws SQLException, ClassNotFoundException {
    teacherDaoimpl teacherDaoimpl = new teacherDaoimpl ();
    teacherDaoimpl.deleteTeacher (9);
}
@Test
public void test4() throws Exception {
    teacherServiceImpl teacherService = new teacherServiceImpl();
    List list = teacherService.selectCourseTeacher ("张扬");
    System.out.println (list);
}
}
